package com.tg.push;

import android.content.Context;
import android.content.SharedPreferences;

public abstract class BasePusher implements PushManagerService{
    public static final String SP_NAME = "tg_push_config";
    public static final String SP_NAME_KEY = "tg_push_id";
    public static final  String OPPO_PUSH_APPKEY = "com.oppo.push.apikey";
    public static final  String OPPO_PUSH_APPSECRET = "com.oppo.push.appsecret";
    public static final  String MI_PUSH_APPID = "com.mi.push.api_id";
    public static final  String MI_PUSH_APPKEY = "com.mi.push.app_key";
    public static  final String HUAWEIPUSH_APPID ="com.huawei.hms.client.appid";
    public static final  String VIVO_PUSH_APPKEY = "com.vivo.push.api_key";
    public static final  String VIVO_PUSH_APPID= "com.vivo.push.app_id";
    public static final  String OPPO_PREFIX ="oppo_";
    public static final  String MI_PREFIX ="mi_";
    protected String deviceId = "";
    protected Context context;
    protected TGCommonCallback pushCallback;
    public String errorMsg = "-1";
    public  void init(Context context){
        this.context = context;
    }

    protected void setErrorMsg(String errorCode ,String errorMessage) {
        this.errorMsg = String.format("errorcode:%s,errorMessage:%s",errorCode,errorMessage);
    }

    @Override
    public String getDeviceId() {

        return errorMsg;
    }

    public TGCommonCallback getCallback() {
        return pushCallback;
    }
}
